The present disclosure relates to a sewing machine that is provided with a swinging mechanism that swings a needle bar, and to a non-transitory computer-readable medium that stores a sewing machine control program.
A pattern data creation device is known that, in accordance with a command from a user, generates sewing data for sewing a pattern. The sewing data are data that specify an amount that a sewing workpiece is fed by a feed mechanism and a position to which a needle bar is swung by a swinging mechanism. The pattern data creation device is built into a sewing machine that is provided with a feed mechanism that has a feed dog and with a swinging mechanism that swings a needle bar. By operating the feed dog, the feed mechanism moves a sewing workpiece in a first direction. The swinging mechanism swings the needle bar in a second direction that intersects the first direction. In a case where the user will create the sewing data for a new pattern in the sewing machine, the user sequentially inputs a plurality of needle drop points on a touch panel with which the sewing machine is provided. The sewing machine creates the sewing data for the pattern based on the needle drop points that have been input.